package com.yqy;

public class Employee {

    private int empId;
    private String name;
    private String address;
    private PaymentClassification paymentClassification;
    private PaymentMethod paymentMethod;

    public Employee(int empId, String name, String address) {
        this.empId = empId;
        this.name = name;
        this.address = address;
        
    }

    public int getEmpId() {
        return empId;
    }

    public void setName(String newname) {
        this.name = newname;
    }

    public String getName() {
        return name;
    }

    public void setAddress(String newAddress) {
        this.address = newAddress;
    }
    
    public String getAddress() {
        return address;
    }

    public PaymentClassification getPaymentClassification() {
        return paymentClassification;
    }

    public PaymentMethod getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentClassification(PaymentClassification paymentClassification) {
        this.paymentClassification = paymentClassification;
    }

    public void setPaymentMethod(PaymentMethod paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    // 根据计算工资的方式，支付方式，计算工资并填写到 paycheck
    public void pay(Paycheck paycheck) {
        paycheck.setAmount(paymentClassification.calculatePay());
        paycheck.setDisposition(paymentMethod.getDisposition());
    }

}
